﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Medianamik.Core.Sugar;

namespace Medianamik.Tests.Unit.Medianamik.Core.Sugar
{
    [TestFixture]
    public class StringHelperTests
    {
        [Test]
        public void TestRemoveParam()
        {
            Assert.That("?test=1abc".RemoveParam("test"), Is.EqualTo(""));
            Assert.That("?test=1abc&test2=2abc".RemoveParam("test"), Is.EqualTo("?test2=2abc"));
            Assert.That("http://www.test.html?test=1abc".RemoveParam("test"), Is.EqualTo("http://www.test.html"));
            Assert.That("http://www.test.html?test=1abc&test2=2abc".RemoveParam("test"), Is.EqualTo("http://www.test.html?test2=2abc"));
        }
    }
}
